package site.service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.n3r.eql.Eql;
import org.springframework.stereotype.Service;

import com.google.common.collect.ImmutableMap;

@Service
public class HomeService {

    public Map queryIndexInfo() {
        List<Map> banners = new Eql().select("queryBanners").returnType(HashMap.class).execute();
        List<Map> works = new Eql().select("queryWorks").returnType(HashMap.class).execute();
        return ImmutableMap.of("banners", banners, "works", works);
    }
}
